import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: "/login"
    },
    {
      path: "/login",
      name: "Login",
      component: ()=>import("../views/Login.vue")
    },

    {
      path: '/home',
      component: () => import( '../views/home.vue'),
      children: [
        {
          path: '/manage/user',
          name: 'User',
          component: () => import( '../views/manage/User.vue'), //用户管理页
        },
        {
          path: '/manage/department',
          name: 'Department',
          component: () => import( '../views/manage/Department.vue'), //部门管理页
        },
        {
          path: '/information',
          name: 'Information',
          component: () => import( '../views/information/Information.vue'), // 消息页
        },
        {
          path: '/workbench',
          name: 'Workbench',
          component: () => import( '../views/workbench/Workbench.vue'), // 工作台页
        },
        {
          path: '/calendar',
          name: 'Calendar',
          component: () => import( '../views/calendar/Calendar.vue'), // 日历页
        },
      ]
    },

    {
      path: "/editor",
      name: "testEditor",
      component: ()=>import("../views/testWangEditor.vue")
    },

  ]
})

